local castswordSkill = fk.CreateSkill {
  name = "castsword&",
}

castswordSkill:addEffect("active", {
  prompt = "#castsword",
  target_num = 0,
  on_use = function(self, room, effect)
    room:moveCards({
      ids = effect.cards,
      from = effect.from,
      toArea = Card.DiscardPile,
      skillName = castswordSkill.name,
      moveReason = fk.ReasonPutIntoDiscardPile,
      proposer = effect.from,
    })
    room:broadcastPlaySound("./audio/system/recast")
    if effect.from.dead then return end
    local cards = room:getCardsFromPileByRule("slash")
    if #cards > 0 then
      room:moveCards({
      ids = cards,
      to = effect.from,
      toArea = Card.PlayerHand,
      moveReason = fk.ReasonJustMove,
      skillName = castswordSkill.name,
      proposer = effect.from,
      moveVisible = true,
    })
    end
  end
})

Fk:loadTranslationTable{
  ["castsword&"] = "铸剑",
  [":castsword&"] = "你可以将此牌置入弃牌堆，摸一张【杀】。",
  ["#castsword"] = "将此牌置入弃牌堆，摸一张【杀】。",
}


return castswordSkill
